package com.miplus.ccrm.core.service.collect;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.base.MPJBaseService;
import com.miplus.ccrm.common.CmdResVo;
import com.miplus.ccrm.common.JSysUser;
import com.miplus.ccrm.core.controller.vo.ficase.*;
import com.miplus.ccrm.core.pojo.FiCreditcases;

import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;

/**
* @author pc
* @description 针对表【fi_creditcases(案件表)】的数据库操作Service
* @createDate 2024-03-26 21:59:40
*/
public interface FiCreditcasesService extends MPJBaseService<FiCreditcases> {

    List<GrpCaseCountVo> grpCaseCountList(GrpListReqVo paras);

    List<DistResVo> fiCaseDistribute(JSysUser user, DistReqVo paras, List<Integer> caseList);

    List<DistResVo> preDistribute(DistReqVo paras, List<Integer> caseList);

    boolean doDistCaseTo(List<DistResVo> distResVoList, String batchid, String $usrid, Integer binddays, Integer actiontype, Integer distmode, String batchname, Double aimrate);

    List<DistResVo> fiCaseAssign(JSysUser user,AssReqVo paras,List<Integer> caseList);

    List<DistResVo> preAssign(AssReqVo paras, List<Integer> caseList);

    boolean doAssignCaseTo(List<DistResVo> distResVoList,String batchid,String $usrid,Integer actiontype,Integer distmode,String assgrp,Integer binddays);

    CmdResVo fiCaseRecycle(JSysUser user, RecyReqVo paras, List<Integer> recylistID, boolean oneRecycle);

    CmdResVo getCustFiCaseCount(String custnumber);

    CmdResVo getFiCaseReliefCount(Integer ficaseid);

    int updateCallTask(Integer ficaseid,Integer taskid,Date appointdt);

    IPage<FiAppointResVo> fiAppointCaseList(String $usrid, FiAppointReqVo paras);

    CmdResVo getProdType(Integer ficaseid);

    List<Integer> getCaseIDList(String custno);

    CmdResVo getRecycleProcess();

    CmdResVo fiCaseTranDist(JSysUser user, TranDistReqVo paras, List<Integer> distCaseList);

    void BuildFiCaseAmt(FiCreditcases fi,LinkedHashMap p);

    //V2.0不在使用，案件生成时就写入了，每天跑批时更新
    //LinkedHashMap getFiCaseAcctBal(Integer ficaseid);

    int updateToHistByID(Integer ficaseid);

    List<CaseNavResVo> getCaseNavigate();

    String getOrderByFiled(String orderby);

    CmdResVo fiCaseDistRoll(String usrid,DistRollVo distRollVo);
}
